package com.diablo.sitemanager.dao;

import com.diablo.sitemanager.entity.*;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("ArticleMapper")
public interface ArticleMapper {
    int deleteByPrimaryKey(Long aid);

    int insert(Article record);

    int insertSelective(Article record);

    Article selectByPrimaryKey(Long aid);

    int updateByPrimaryKeySelective(Article record);

    int updateByPrimaryKeyWithBLOBs(Article record);

    int updateByPrimaryKey(Article record);

    //后台管理
   @Select("select *,taglabel as tagName,username as authorName from article,user,tag where tagid=tid and authorid=uid")
    List<ArticleVo> selectAllAricle();
}